package com.book.dacnhantam;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import com.book.dacnhantam.data.Chapter;
import com.book.dacnhantam.data.ChapterProvider;
import java.util.List;

public class TableOfContentsActivity extends Activity
  implements AdapterView.OnItemClickListener
{
  private ChapterProvider mChapterProvider;
  private List<Chapter> mChapters;
  private ListView mListView;

  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    getWindow().setFlags(1024, 1024);
    setContentView(2130903045);
    this.mListView = ((ListView)findViewById(2131230734));
    this.mChapterProvider = ChapterProvider.getChapterProvider();
    this.mChapters = this.mChapterProvider.getChapters();
    this.mListView.setAdapter(new ChapterAdapter(this, this.mChapters));
    this.mListView.setOnItemClickListener(this);
  }

  public void onItemClick(AdapterView<?> paramAdapterView, View paramView, int paramInt, long paramLong)
  {
    Intent localIntent = new Intent(this, ChapterActivity.class);
    localIntent.putExtra("chapter_id", this.mChapterProvider.getChapterByLocation(paramInt).getId());
    startActivity(localIntent);
  }
}

/* Location:           C:\Users\chutieucodon\Desktop\dec\com.book.dacnhantam-36fb9c182ef79376b618c867d3d1c347\classes_dex2jar.jar
 * Qualified Name:     com.book.dacnhantam.TableOfContentsActivity
 * JD-Core Version:    0.6.0
 */